<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="Hui/lib/html5.js"></script>
<script type="text/javascript" src="Hui/lib/respond.min.js"></script>
<script type="text/javascript" src="Hui/lib/PIE_IE678.js"></script>
<![endif]-->
<link href="Hui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="Hui/css/H-ui.login.css" rel="stylesheet" type="text/css" />
<link href="Hui/css/style.css" rel="stylesheet" type="text/css" />
<link href="Hui/lib/font-awesome/font-awesome.min.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="Hui/lib/iconfont/iconfont.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<script type="text/javascript" src="Hui/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="Hui/lib/layer1.9/layer.js"></script>
<title>后台登录 - IT服务中心 - V1.0</title>
<meta name="keywords"
	content="H-ui.admin v2.2,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description"
	content="H-ui.admin v2.2，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
	<input type="hidden" id="TenantId" name="TenantId" value="" />
	<div class="header"></div>
	<div class="loginWraper">
		<div id="loginform" class="loginBox">
			<form class="form form-horizontal" action="login!login.action"
				method="post" onsubmit="return checkCode()">
				<input type="hidden" name="error" id="error" value="${error}">
				<div class="row cl">
					<label class="form-label col-3"><i class="iconfont">&#xf00ec;</i></label>
					<div class="formControls col-8">
						<input id="user_name" name="user_name" type="text"
							placeholder="账户" class="input-text size-L">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-3"><i class="iconfont">&#xf00c9;</i></label>
					<div class="formControls col-8">
						<input id="user_pwd" name="user_pwd" type="password"
							placeholder="密码" class="input-text size-L">
					</div>
				</div>
				<div class="row cl">
					<div class="formControls col-8 col-offset-3">
						<input class="input-text size-L" type="text" placeholder="验证码"
							id="codeinput" name="code" style="width: 150px;"> <img
							src="imageAction.action" id="code"> <a id="Verify"
							href="javascript:;">看不清，换一张</a>
					</div>
				</div>
				<div class="row">
					<div class="formControls col-8 col-offset-3">
						<input id="tosubmit" name="" type="submit"
							class="btn btn-success radius size-L"
							value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;"> <input
							name="" type="reset" class="btn btn-default radius size-L"
							value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="footer">Copyright 广东轻院IT服务中心 Power by IT研发部</div>

	<script type="text/javascript" src="Hui/lib/jquery.min.js"></script>
	<script type="text/javascript" src="Hui/js/H-ui.js"></script>
	<script>
		var islogin = true;
		var _hmt = _hmt || [];
		(function() {
			var hm = document.createElement("script");
			hm.src = "//hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";
			var s = document.getElementsByTagName("script")[0];
			s.parentNode.insertBefore(hm, s);
		})();
		var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://"
				: " http://");
		document
				.write(unescape("%3Cscript src='"
						+ _bdhmProtocol
						+ "hm.baidu.com/h.js%3F080836300300be57b7f34f4b3e97d911' type='text/javascript'%3E%3C/script%3E"));

		$(function() {
			//点击图片更换验证码
			$("#Verify").click(
					function() {
						$("#code").attr(
								"src",
								"imageAction.action?timestamp="
										+ new Date().getTime());
					});

			$("#codeinput").on("blur", function() {
				$.post("login!checkCode.action", {
					code : $("#codeinput").val()
				}, function(data, status) {
					if (data != 0) {
						$("#tosubmit").on("click", function() {
							layer.msg("验证码错误");
							return false;
						});
						islogin = false;
						layer.msg("验证码错误");
					} else {
						$("#tosubmit").off("click");
						islogin = true;
					}
				});
			});

		});
		function checkCode() {
			if ($("#user_name").val() == "") {
				layer.msg("用户名不能为空");
				return false;
			}
			if ($("#user_pwd").val() == "") {
				layer.msg("密码不能为空");
				return false;
			}
			if ($("#codeinput").val() == "") {
				layer.msg("验证码不能为空");
				return false;
			}
			if (!islogin) {
				return false;
			}

			return true;

		}

		$(document).ready(function() {
			if ($("#error").val() != "") {
				layer.msg($("#error").val());
			}
		})
	</script>
</body>
</html>
